package com.briup.exception;

import com.briup.result.ResultCode;
import lombok.Getter;
import lombok.Setter;

/**
 * Project: jd2407_third
 * Package: com.briup.exception
 * Author: XBai
 * Time: 2024/10/30 9:21
 * 自定义业务异常
 */

@Getter
@Setter
public class ServiceException extends RuntimeException {
    private ResultCode resultCode;
    public ServiceException(ResultCode resultCode){
        super(resultCode.getCode() + "-" + resultCode.getMsg());
        this.resultCode = resultCode;
    }
    public ServiceException(String msg){
        super(msg);
    }
}
